package com.chainyoung.component_tmmarket.api;

import com.chainyoung.common.appcommon.entity.CommonList;
import com.chainyoung.common.base.BaseResponse;
import com.chainyoung.common.bean.UserInfo;
import com.chainyoung.component_tmmarket.bean.Kline;
import com.chainyoung.component_tmmarket.bean.MarketCoupleList;
import com.chainyoung.component_tmmarket.bean.MarketList;

import java.util.List;
import java.util.TreeMap;

import io.reactivex.Flowable;
import okhttp3.ResponseBody;
import retrofit2.http.Field;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

public interface MarketService {

    @POST(MarketApiConstant.GET_MARKET_CURRENCYS)
    Flowable<BaseResponse<MarketList>> getMarketCurrencys();

    @FormUrlEncoded
    @POST(MarketApiConstant.GET_MARKET_K_LINE)
    Flowable<BaseResponse<List<Kline>>> getMarketKLine(@Field("market") String market);

    @FormUrlEncoded
    @POST(MarketApiConstant.GET_USER_INFO)
    Flowable<BaseResponse<UserInfo>> getUserInfo(@FieldMap TreeMap<String, Object> map);

    @FormUrlEncoded
    @POST(MarketApiConstant.MARKET_COUPLE_LIST)
    Flowable<BaseResponse<MarketCoupleList>> getMarketCoupleList(@FieldMap TreeMap<String, Object> map);

    @FormUrlEncoded
    @POST(MarketApiConstant.GET_MARKET_LIST_DETAIL)
    Flowable<ResponseBody> getMarketListDetail(@FieldMap TreeMap<String, Object> map);

}
